<include file="Public:header" title="年级管理 - 组别管理" />
<h2>年级管理</h2>
<span>当前共有 <{$count.count}> 个年级</span>
<form method="post" action="<{:U('addGroup?type=2')}>" onSubmit="return post_form('<{:U('addGroup?type=2')}>',this,'addTips',changeGroup('#groupSelector'));" style="height:40px;">
<div class="fl">
<label for="groupSelector">组别选择</label>
<select name="group" id="groupSelector" style="width:250px;" onchange="return changeGroup(0,this,'#gradesTable');">   
	<option value="0">请选择组别</option>   
	<volist name="groups" id="vo">
	<option value="<{$vo.id}>"><{$vo.cname}></option>
	</volist>
</select>
<label for="addGradeName">年级</label><input id="addGradeName" type="text" name="grade" placeholder="年级" class="text" />
<input type="submit" value="添加年级" class="btn" /></div> <div id="addTips" class="tip fl" style="margin-top:2px;">添加提示</div>
</form>
<table style="width: 100%;">
  <thead>
    <tr>
      <td style="min-width: 3%;text-align:center;">#</td>
	  <td style="text-align:center;">所属组别</td>
      <td style="text-align:center;">年级</td>
	  <td style="text-align:center;">操作</td>
    </tr>
  </thead>
  <tbody id="gradesTable">
  <volist name="grades" id="vo" key="i">
    <tr>
      <td style="text-align:center;"><{$vo.id}></td>
	  <td style="text-align:center;"><{$vo.gname}></td>
      <td style="text-align:center;"><{$vo.cname}></td>
	  <td style="text-align:center;"><a class="editUser" href="<{:U('editGrade?&id='.$vo['id'])}>">编辑</a>&nbsp;&nbsp;<a href="javascript:delGroup(2,<{$vo.id}>);">删除</a></td>
    </tr>
  </volist>
  </tbody>
</table>
<div class="pageSwitcher"><{$page}></div>
<include file="Public:footer" />